﻿using IterationLife.FootballTeaching.Models;
using Util.Datas.Ef;

namespace IterationLife.Datas.Mappings.FootballTeachings
{
    /// <summary>
    /// 课程映射配置
    /// </summary>
    public class CourseMap : AggregateRootMapBase<Course>
    {
        /// <summary>
        /// 映射表
        /// </summary>
        protected override void MapTable()
        {
            ToTable("Courses", "FootballTeaching");
        }

        /// <summary>
        /// 映射属性
        /// </summary>
        protected override void MapProperties()
        {
            //课程编号
            Property(t => t.Id)
                .HasColumnName("CourseId");
            //课程分类Json字符串
            Property(t => t.CourseCategoriesJsonStr)
                .HasColumnName("CourseCategories");
            //球员位置集合Json字符串
            Property(t => t.PlayerPositionsJsonStr)
                .HasColumnName("PlayerPositions");
            //封面图
            Property(t => t.BannerJsonStr)
                .HasColumnName("Banner");
        }

        /// <summary>
        /// 映射导航属性
        /// </summary>
        protected override void MapAssociations()
        {
        }
    }
}